public class Display {
    private int value;
    private int limit;

    public Display(int value, int limit) {
        this.value = value;
        this.limit = limit;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public void increase(){
        if(value <= limit){
            value++;
        }else{
            value = 0;
        }
    }
}
